package cn.nawang.ebeim.uc;

import org.eclipse.swt.widgets.Composite;
import org.embedded.browser.ChromeSettings;
import org.embedded.browser.Chromium;

public class ChromiumSingleton {
//懒汉式单例类.在第一次调用的时候实例化自己   
    private ChromiumSingleton() {}  
    private static Chromium single=null;  
    //静态工厂方法   
    public static synchronized Chromium getInstance(Composite composite, int style) {  
         if (single == null) {    
             single = new Chromium(composite,style,"about:blank",new ChromeSettings().right_button(false, true));  
         }    
        return single;  
    }  
}
